#set(title='图书详情',gradeMap={'1':'非常不满','2':'不满意','3':'一般','4':'满意','5':'非常满意'}) 
#@index_layout() 
#define index_main()
<div class="row">
	<ol class="breadcrumb">
	  <li><a href="#(ctx)">首页</a></li>
	  <li><a href="#">#(book.category)</a></li>
	  <li class="active">#(book.name)</li>
	</ol>
</div>
<div class="row">
	<div class="col-sm-3">
		<div>
			<img src="#(uploadPah)#(book.bookImg)" class="img-responsive" alt="Responsive image">
		</div>
		<div class="text-muted text-center" style="margin-top: 10px;">
			<span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span>分享&nbsp;&nbsp;&nbsp;&nbsp;<span class="glyphicon glyphicon-star" aria-hidden="true"></span>收藏商品
		</div>
	</div>
	<div class="col-sm-6">
		<div class="name_info">
			<h3><b>#(book.name)</b></h3>
			<h4>#(book.summary)</h4>
		</div>
		<div class="text-muted" style="margin-top: 8px;">
			<span>作者：#(book.author)</span>&nbsp;&nbsp;<span>出版社：#(book.publisher)</span>&nbsp;&nbsp;<span>出版日期：#(book.pub_date)</span>
		</div>
		<div class="text-danger">
			<h1>¥#(book.price)</h1>
		</div>
		
		<div>
			<input type="hidden" value="#(book.id)" id="bookid"/>
			<input type="number" id="booknum" value="1" min="1" max="5" style="height: 38px;text-align:center;"/>&nbsp;&nbsp;&nbsp;
			<button type="button" class="btn btn-success btn-lg" id="addToCartBtn"><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span>加入购物车</button>
		</div>
	</div>
	<div class="col-sm-3">
		<ul class="fuwu clearfix" dd_name="服务标示" id="shop-service" style="">    
		<li class="zpbz">
	        <i></i> <a href="#">正品保障</a>
	                    </li>
	    <li class="hdfk" id="huodaofukuan">
	        <i></i>            <a href="#">货到付款</a>
	                 </li>
	    <li class="fwzc">
	        <i></i>            <a href="#">服务支持</a>
	                    </li>
	    <li class="cjfh">
	        <i></i>            <a href="#">差价返还</a>
	                    </li>
	    <li class="hh">
	        <i></i>            <a href="#">15天换货</a>
	                    </li>
	    <li class="lpbz">
	        <i></i><a href="#">礼品包装</a></li>
	    <li class="zcth other">
	        <i></i>            <a href="#">支持7天无理由退货</a>
	                    </li>
	    <li class="zclpk other J-lpk">
	        <i></i>            <a href="#">支持礼品卡</a>
	                    </li>
	</ul>
	</div>
</div>
<div class="row" style="margin-top: 30px;">
  <div class="col-sm-10 col-sm-offset-1">
	  <!-- Nav tabs -->
	  <ul class="nav nav-tabs" role="tablist">
	    <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">商品详情</a></li>
	    <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">商品评论</a></li>
	  </ul>
	
	  <!-- Tab panes -->
	  <div class="tab-content">
	    <div role="tabpanel" class="tab-pane active" id="home">
	    	<table class="table" style="border-top-width: 0px;">
	    		<tr class="firstTr"><td style="border-top-width: 0px;">版 次：1</td><td style="border-top-width: 0px;">页 数：36</td><td style="border-top-width: 0px;">字 数：4689</td></tr>
	    		<tr><td>印刷时间：2017年09月01日</td><td>开 本：32开</td><td>纸 张：轻型纸</td></tr>
	    		<tr><td>纸 张：轻型纸</td><td>包 装：平装-胶订</td><td>国际标准书号ISBN：9787550024212</td></tr>
	    	</table>
	    	<div><p>#(book.description)</p></div>
	    	<div>
	    		<img src="#(ctx)/upload/#(book.descImg)" class="img-responsive" alt="Responsive image">
	    	</div>
	    </div>
	    <div role="tabpanel" class="tab-pane" id="profile">
	    	<div class="row" style="margin: 10px">
	    		对已购商品写评论&nbsp;&nbsp;<a type="button" class="btn btn-info" href="#(ctx)/order/list">写评论助他人</a>
	    	</div>
	    	<div class="table-responsive">
	            <table class="table table-striped ">
	              <tbody>
	               #for(x : page.getList())
		             	<tr>
		             	  <td align="center"><img src="#(ctx)/img/user.png" width="50px" class="img-responsive" alt="user image">
		             	  		<span class="text-muted">user-#(x.userId)</span></td>
		                  <td>#(gradeMap[x.grade+''])</td>
		                  <td>#(x.content)</td>
		                   <td>#(x.createTime)</td>
		                </tr>
	                #end
	              </tbody>
	            </table>
	          </div>
	    </div>
	  </div>
	</div>
</div>
#end

